import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/system/sysLogin/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
// 个人信息页面获取个人信息数据
export function getUserInfo(params = {}) {
  return request.get('/system/sysUser/', { params })
}
// 获取个人消息列表
export function personalMessageApi(params = {}) {
  return request.get('message/message/page', { params })
}
// 办理消息
export function seeMessageApi(params = {}) {
  return request.put('message/message/onRead', params)
}
// 获取个人消息数量
export function getMessageNumApi(params = {}) {
  return request.get('message/message/getMark', { params })
}
